#ifndef QLEVELVIEW_H
#define QLEVELVIEW_H

#include <QWidget>
#include <QImage>
#include "mainwindow.h"

struct QRoboDoor
{
    int iPosX;
    int iPosY;
    int iPosXPixel;
    int iPosYPixel;
};

class QLevelView : public QWidget
{
    Q_OBJECT
public:
    explicit QLevelView(QWidget *parent = 0);
    MainWindow *MainWin;
    bool bLevelChanged;
    int iCurrentLevel;
    unsigned char CurrentLevel[iBytesPerLevel];
    unsigned char ColourToHex(QColor Colour);
    QColor HexToColour(int iHexCode);
    QColor LevelForegroundColour;
    QColor LevelBackgroundColour;
    QRoboBoard Boards[iMaxBoards];

signals:


public slots:
    void updateView();
    void deleteBoard(int i);
    void boardsChanged(int iBoard);

protected:
    void paintEvent(QPaintEvent *);
    void mouseMoveEvent(QMouseEvent *);
    void mousePressEvent(QMouseEvent *);
    void DrawTile(int iTileNo, int iX, int iY);
    void SetBoardBoxes();
    void WriteBoard(int i);
    void CreateBoard(int i);
    void SetBoard1(QRoboBoard B);
    void SetBoard2(QRoboBoard B);
    void SetBoard3(QRoboBoard B);
    void SetBoard4(QRoboBoard B);
    void SetBoard5(QRoboBoard B);
    QColor TileToColour(unsigned char iTile);
    QColor CurrentTextColour;
    QPoint SelectedTile;
    QRoboDoor Door;
    //int iBoardCount;
    QImage RecolouredTiles[14];

private slots:


private slots:

};

#endif // QLEVELVIEW_H
